

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Picture List</title>
        <script type="text/javascript"> document.observe("dom:loaded", Lightbox.onload); </script>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Picture</g:link></span>
        </div>
        <div class="body">
            <h1>Picture List</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                   	        <g:sortableColumn property="id" title="Id" />
                        
                   	        <g:sortableColumn property="caption" title="Caption" />
                        
                   	        <g:sortableColumn property="description" title="Description" />
                        
                   	        <g:sortableColumn property="contentType" title="Content Type" />
                        
                   	        <g:sortableColumn property="dateCreated" title="Date Created" />
                        
                   	        <g:sortableColumn property="height" title="Height" />
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${pictureList}" status="i" var="picture">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td class='gallery'>
                              <wa:pictureLightboxAnchor picture="${picture}" size="${Image.Small}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" />
                            </td>
                    
                            <td>${fieldValue(bean:picture, field:'caption')}</td>
                        
                            <td>${fieldValue(bean:picture, field:'description')}</td>
                        
                            <td>${fieldValue(bean:picture, field:'contentType')}</td>
                        
                            <td>${fieldValue(bean:picture, field:'dateCreated')}</td>
                        
                            <td>${fieldValue(bean:picture, field:'height')}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${Picture.count()}" />
            </div>
        </div>
    </body>
</html>
